from decimal import Decimal
from enum import Enum
from typing import List, Dict, Union

from pydantic import BaseModel


class IDModelMixin(BaseModel):
    id: int


class Type(str, Enum):
    number = "number"
    square = "square"


class Scopes(BaseModel):
    name_zh: str
    name_ug: str
    price: str


class Create(BaseModel):
    name_zh: str
    name_ug: str
    is_menu: int
    province: Union[int, None]
    city: int
    region: int
    cid: int
    start_price: Decimal
    menu_count: int
    type: Type
    images: str
    description: str
    vip_benefit: float
    scopes: List[Scopes]


class Update(BaseModel):
    name_zh: str
    name_ug: str
    cid: int
    is_menu: int
    start_price: Decimal
    menu_count: int
    province: Union[int, None]
    city: int
    region: int
    images: str
    type: Type
    description: str
    vip_benefit: float
